#ifndef CICORE_POINT_H
#define CICORE_POINT_H

#include <cmath>

#include "Vertex.h"

namespace CICore {
    class Vertex;

    class Point {    

    public:        
        Point (const float x=0, const float y=0, const float z=0);       //Constructor
        Point (const Vertex& v);                                         //Contructor
        virtual ~Point ();                                               //Destructor

        float x, y, z;      //Point's coordinates            

        //Basic Vertex-to-Point conversion
        Point& operator = (Vertex& v);              //Basic Assignment

        //CONSTANTS
        static const Point ORIGIN;

        //Utility Methods
        void Transform (const Matrix& m);
    };    

    //Basic point's unary operations
    Point& operator ++ (Point& p, int);             //Postfix increment
    Point& operator ++ (Point& p);                  //Prefix increment

    Point& operator -- (Point& p, int);             //Postfix decrement
    Point& operator -- (Point& p);                  //Prefix increment

    //Basic point's binary operations
    Point operator + (const Point& a, const Point& b);      //Sum between two points
    Point& operator += (Point& a, const Point& b);          //Assignment by addition between two points

    Point operator - (const Point& a, const Point& b);      //Difference between two points
    Point& operator -= (Point& a, const Point& b);          //Assignment by substraction between two points

    Point operator * (const Point& a, const Point& b);      //Product between two points
    Point& operator *= (Point& a, const Point& b);          //Assignment by multiplication between two points

    Point operator / (const Point& a, const Point& b);      //Quotient between two points
    Point& operator /= (Point& a, const Point& b);          //Assignment by division between two points

    Point operator + (const Point& a, const float b);       //Sum between a point and a float value
    Point& operator += (Point& a, const float b);           //Assignment by addition between a point and a float value

    Point operator - (const Point& a, const float b);       //Difference between a point and a float value
    Point& operator -= (Point& a, const float b);           //Assignment by substraction between a point and a float value

    Point operator * (const Point& a, const float b);       //Product between a point and a float value
    Point& operator *= (Point& a, const float b);           //Assignment by multiplication between a point and a float value

    Point operator / (const Point& a, const float b);       //Quotient between a point and a float value
    Point& operator /= (Point& a, const float b);           //Assignment by division between a point and a float value


}
#endif /* CICORE_POINT_H */
